package ai.zixing.example01.director;

import ai.zixing.example01.builder.Builder;
import ai.zixing.example01.product.Bike;

/**
 * 指挥者类
 */
public class Director {

    private Builder mBuilder;

    public Director(Builder builder) {
        this.mBuilder = builder;
    }

    /**
     * 自行车创建方法
     *
     * @return Bike
     */
    public Bike construct() {
        mBuilder.builderFrame();
        mBuilder.builderSeat();
        return mBuilder.createBike();
    }
}
